﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Data.SqlClient;
using System.Collections;
using System.Windows.Controls;

namespace SoundServant
{
    public class Result
    {
        int id;
        string title;
        MeetingType type;
        int discs;
        int tracks;
        string trackListing = "";
        DateTime date;
        bool first = true;

        public int Id { get { return id; } set { id = value; } }
        public string TrackListing { get { return trackListing; } set { trackListing = value; } }
        public MeetingType Type { get { return type; } set { type = value; } }
        public DateTime Date { get { return date; } set { date = value; } }
        public int Discs { get { return discs; } }
        public int Tracks { get { return tracks; } }
        public string Title { get { return title; } set { title = value; } }


        public void AddDisc(string discTitle)
        {
            discs++;

        }

        public void AddTrack(string trackTitle)
        {
            tracks++;

            if ((trackTitle != null && trackTitle != "" && trackTitle.Length < 4) || (trackTitle.Length >= 4 && trackTitle.Substring(0, 4) != "Song"))
            {
                if (!first) trackListing += ", "; else first = false;
                trackListing += trackTitle;
            }
        }

        public Result()
        {
        }
    }
}
